{% extends "bl_g/base.html" %}
{% load blurb %}

{% block title %}{{ block.super }} | {{ title }}{% endblock %}

{% block extrahead %}
	{% if atom_feed %}
	   <link rel="alternate" type="application/atom+xml" title="{{ atom_feed.title }}" href="{{ atom_feed.url }}">
	{% else %}
	   {{ block.super }}
	{% endif %}
{% endblock %}
{% block article %}
    <h6><a href="{% url cm_s_main %}">Home</a> &raquo;</h6>
    <h1>{{ title }}</h1>

    {% if entries.object_list %}
        {% for entry in entries.object_list %}
		<div class="entry" id="entry_{{ entry.entry.slug }}">
            <h2><a href="{{ entry.entry.get_absolute_url }}">{{ entry.entry.title }}</a></h2>
            {{ entry.entry.body|safe }}
            <p>Posted: {{ entry.entry.published|date:"F j, Y" }}</p>
			<p>Category: <a href="{{ entry.entry.category.get_absolute_url }}">{{ entry.entry.category }}</a></p>
            {% if entry.entry.tags %}<p>Filed under: {% for tag in entry.entry.tags %}{{ tag }} {% endfor %}</p>{% endif %}
            <p><a href="{{ entry.entry.get_absolute_url }}#disqus_thread">Comments</a></p>
		</div>
        {% endfor %}
		
		{% ifnotequal entries.number 1 %}
		<div class="pagination">
		    <span class="step-links">
		        {% if entries.has_previous %}
		            <a href="?page={{ entries.previous_page_number }}">previous</a>
		        {% endif %}
		
		        <span class="current">
		            Page {{ entries.number }} of {{ entries.paginator.num_pages }}.
		        </span>
		
		        {% if entries.has_next %}
		            <a href="?page={{ entries.next_page_number }}">next</a>
		        {% endif %}
		    </span>
	   </div>
	   {% endifnotequal %}
    {% else %}
       <p>No entries yet.</p>
    {% endif %}

{% endblock %}